home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / edit / e34.zip / MACGEN.DOC < prev    next >
Text File  |  1989-01-10  |  11KB  |  226 lines

  1.  
  2.  
  3.                   ┌────────────────────────────────┐
  4.                   │                                │
  5.                   │          MACGEN 3.4            │
  6.                   │                                │
  7.                   │  E! macro editor / generator   │
  8.                   │                                │
  9.                   └────────────────────────────────┘
  10.  
  11.  
  12.                   (c) Patrick Philippot - 1987,88,89
  13.  
  14.  
  15.  
  16. INTRODUCTION
  17. ____________
  18.  
  19.            Macgen  is  a  utility  converting  existing  E!  macros  to  an
  20.       editable  script  files  which  may be the converted to macros again.
  21.       So you will easily modify an existing macro or create a new one.
  22.  
  23.  
  24. SYNTAX
  25. ______
  26.  
  27.            c:\e!> macgen s|m macfile scriptfile
  28.  
  29.            The  "s"  option  means  you  want to convert the existing macro
  30.       (macfile) into a script file.
  31.  
  32.            The  "m"  option  means  you  want  to  convert  an  existing or
  33.       modified script file into an E! macro.
  34.  
  35.            WARNING  :  the  target  file  will  be  either  macfile  (m) or
  36.       scriptfile (s). This file will always be overwritten.
  37.  
  38.            macfile  is  the  macro  file  name  and  takes  a  default .MAC
  39.       extension.
  40.  
  41.            scriptfile  is  the  script  file  name and takes a default .SCR
  42.       extension.
  43.  
  44.            EXAMPLES:
  45.  
  46.            macgen s mymacro.mac  mymacro
  47.  
  48.            converts  an  existing  macro  (mymacro.mac)  into a script file
  49.            (mymacro.scr). If it exists mymacro.scr will be overwritten.
  50.  
  51.            macgen m mymacro mymacro.scr
  52.  
  53.            converts  the  script  file  (mymacro.scr)  into an excutable E!
  54.            macro (mymacro.mac).
  55.  
  56.            macgen s mymacro mymacro
  57.  
  58.            is the same as the first example.
  59.  
  60.  
  61. USING MACGEN
  62. ____________
  63.  
  64.            A  script  file  is  a  text  file  made  up of lines. Each line
  65.       contains one and only command. A command is either
  66.  
  67.            -  a mnemonic between square brackets representing a specific E!
  68.       function. Mnemonics are listed below.
  69.  
  70.                 Ex:  [SORT]  (code 290 : sort the marked block)
  71.  
  72.            - a character string without square brackets but eventually with
  73.       quotes.  In this case the string will be directed to the E! functions
  74.       dispatcher exactly as if you typed it from the keyboard.
  75.  
  76.            Here is a short example of a script file :
  77.  
  78.                      [COMMANDMODE]      macro begins in command mode
  79.                      [TEXT_BEGIN]       go to text beginning
  80.                      [TEXT_BEGIN]
  81.                      =/begin/BEGIN/*    enter a search command
  82.                      [ENTER]
  83.                      [CONTINUE]         continue mark
  84.                      [TEXT_BEGIN]
  85.                      [TEXT_BEGIN]       etc...
  86.                      =/end/END/*
  87.                      [ENTER]
  88.                      [CONTINUE]
  89.                      [TEXT_BEGIN]
  90.                      [TEXT_BEGIN]
  91.                      =/if/IF/*
  92.                      [ENTER]
  93.  
  94.            On  a  script  line  containing  a mnemonic, the first non blank
  95.       character must be a left square bracket. All text not included within
  96.       the brackets is ignored. So you may freely comment your commands.
  97.  
  98.            For  non mnemonic commands, all the text available is sent to E!
  99.       except the leading and trailing blanks. If you use quotes leading and
  100.       trailing blanks will be taken into account.
  101.  
  102.            If  MACGEN  detects  an error it will issue an error message and
  103.       stop. It will eventually display the line containing the error.
  104.  
  105.            The  first line of a script file must be either [COMMANDMODE] or
  106.       [EDITMODE].
  107.  
  108.            Commands may be either uppercase or lowercase.
  109.  
  110.            Please see E! documentation on macros.
  111.  
  112.  
  113. MNEMONICS LIST
  114. ______________
  115.  
  116.  
  117. Function code        Mnemonic                     Function
  118.  
  119.  
  120.     001            [ALIGN_TEXT]          Align text to cursor
  121.     002            [PASCAL_STYLE]        See documentation (Ctrl B)
  122.     003            [CLEAR_LINE]          Clear line
  123.     004            [REPEAT_CHAR]         Repeat specified character
  124.     005            [CLEAR_EOL]           Erase end of line
  125.     006            [WRAP]                Toggle Wordwrap
  126.     007            [43_LINES]            Toggle 35/43/50 lines mode
  127.     008            [DELETE_LEFT]         Delete left character
  128.     009            [NEXT_TAB]            Go to next tab
  129.     010            [JUSTIFICATION]       Toggle justify mode
  130.     012            [EDIT]                Edit a file
  131.     013            [ENTER]               Insert a line or validate a command
  132.     014            [INSERT_NAME]         Insert filename
  133.     016            [MACRO]               Execute active macro
  134.     017            [RESTORE_MACRO]       Restore previous macro
  135.     019            [REPEAT_SEARCH]       Repeat last search
  136.     020            [INSERT_DATE]         Insert date and time
  137.     022            [INIT_SEARCH]         Initialize search variables
  138.     023            [DEL_WORD]            Delet current word
  139.     024            [EXECUTE]             Execute current line as a command
  140.     026            [LIST_DIR]            List current line as a directory
  141.     027            [CHANGE_MODE]         Toggle between editmode and commandmode
  142.     127            [REMOVE_LINE]         Remove current line
  143.     271            [PREV_TAB]            Go to previous tab
  144.     272            [CONTINUE]            Insert a continue-mark in macro
  145.     274            [END_OF_BLOCK]        Go to end of block
  146.     275            [REMOVE_TAB]          Remove current tab position
  147.     276            [RECORD_TAB]          Create a new tab positioneur
  148.     277            [BLOCK_BEGIN]         Go to block begin
  149.     278            [UNMARK]              Unmark block
  150.     279            [REMOVE_TABS]         Remove all tab positions
  151.     280            [OVERLAY]             Overlay block at cursor position
  152.     281            [PARAGRAPH]           Go to next paragraph
  153.     286            [ADJUST]              Adjust block position
  154.     287            [SPLIT]               Split line at cursor
  155.     288            [DELETE_BLOCK]        Delete marked block
  156.     289            [FILL_BLOCK]          Fill block with specified character
  157.     290            [SORT]                Sort block
  158.     291            [BOX]                 Draw a box around the block
  159.     292            [JOIN]                Join current line and next line
  160.     293            [BOOKMARK]            Drop bookmark
  161.     294            [LINE_MARK]           Mark lines
  162.     300            [SENTENCE_MARK]       Mark sentences
  163.     301            [GRAPHICS]            Toggle control characters access
  164.     302            [COPY_BLOCK]          Copy block to cursor position
  165.     303            [REMOVE_SPACES]       Remove trailing blanks
  166.     304            [BLOCK_MARK]          Mark block
  167.     306            [MOVE_BLOCK]          Move block
  168.     315            [HELP]                Load help file
  169.     316            [SAVE]                Save current file
  170.     317            [QUIT]                Quit current file
  171.     318            [QUIT_SAVE]           Quite and save current file
  172.     319            [WINDOW]              Create/Remove window
  173.     320            [DRAW]                Toggle draw mode
  174.     321            [NAME]                Name current file
  175.     322            [EDIT]                Edit a new file
  176.     323            [RESTORE]             Restore (undo) current line
  177.     324            [NEXT]                Go to next file
  178.     327            [LINE_BEGIN]          Go to line begin
  179.     328            [UP]                  Up
  180.     329            [PREV_PAGE]           Scroll screen up
  181.     331            [LEFT]                Left
  182.     333            [RIGHT]               Right
  183.     335            [EOL]                 Go to end of line
  184.     336            [DOWN]                Down
  185.     337            [NEXT_PAGE]           Scroll screen down
  186.     338            [TOGGLE_INSERT]       Toggle insert mode
  187.     339